package com.wty.design.structural.composite;

/**
 * @Author wangtengyu
 * @Create 2018-09-19-15:19
 * 目录中的实体类和目录类都继承自该类
 */
public class CatalogComponent {

    public void add(CatalogComponent catalogComponent){
        throw new UnsupportedOperationException("不支持添加操作");
    }

    public void remove(CatalogComponent catalogComponent){
        throw new UnsupportedOperationException("不支持移除操作");
    }

    public String getName(CatalogComponent catalogComponent){
        throw new UnsupportedOperationException("不支持获取名字的操作");
    }

    public int getPrice(CatalogComponent catalogComponent){
        throw new UnsupportedOperationException("不支持获取价格的操作");
    }


    public void print(){
        throw new UnsupportedOperationException("不支持打印操作");
    }











}
